<?php 


defined('MYAPP_ENVIRONMENT') || define('MYAPP_ENVIRONMENT', getenv('MYAPP_ENVIRONMENT') ? getenv('MYAPP_ENVIRONMENT') : '');

include "list.php";

function getImageInfo($f) {
	$result = "";
	$txt_file = str_replace('.jpg', '.txt', $f);
	if (file_exists($txt_file)) {
		$result = file_get_contents($txt_file);
	}
	return $result;
}


$stills = array();
foreach(listFiles('./stills/thumbs', 'jpg') as $f) {
	$src = str_replace('/thumbs', '', $f);
	$stills[] = array(
		'thumb' => $f, 
		'src' => $src, 
		'title' => getImageInfo($src)
	);
}



$tpldir = 'templates/';
include $tpldir . "header.phtml";
include $tpldir . "page-intro.phtml";
include $tpldir . "page-main.phtml";
include $tpldir . "page-grid.phtml";
include $tpldir . "page-stills.phtml";
include $tpldir . "footer.phtml";

?>